package edu.jd.movieplatform.search.movie.dao;

import edu.jd.movieplatform.search.movie.Movie;
import edu.jd.movieplatform.search.movie.MovieDto;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface MovieDao {


    List<Movie> findMovieListByCondition(MovieDto dto);

    List<Movie> findMovieListById(int id);

    @Select("select * from movie " +
            "where mov_name like CONCAT('%',#{keyword},'%') " +
            "or mov_label like CONCAT('%',#{keyword},'%')")
    List<Movie> findMovieByKeyword(String keyword);
}
